<?php
class UserData
{
  public static function store($name, $value, $persistance = 0)
  {
    $response = sfContext::getInstance()->getResponse();
    $response->setCookie($name, $value);
  }
  
  public static function get($name, $default = null)
  {
    $request = sfContext::getInstance()->getRequest();
    return $request->getParameter($name, $request->getCookie($name, $default));
  }
}